package com.elmcode.study.design.pro06_observer;

import com.elmcode.study.design.pro06_observer.observers.FenSi;
import com.elmcode.study.design.pro06_observer.observers.Observer;
import com.elmcode.study.design.pro06_observer.target.DiLiReBa;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;

@Slf4j
public class ObserverClient {

    @Test
    public void testObserver(){
        DiLiReBa diLiReBa = new DiLiReBa();

        Observer fenSi01 = new FenSi("劳志警");
        Observer fenSi02 = new FenSi("温雅婷");

        diLiReBa.registerObserver(fenSi01);
        diLiReBa.registerObserver(fenSi02);

        diLiReBa.changeStatus("明天迪丽热巴要去跳舞");
    }

}
